package com.youlu.campus.entity;

import com.youlu.campus.base.base.EntityBase;
import lombok.Getter;
import lombok.Setter;
import org.springframework.data.mongodb.core.index.Indexed;
import org.springframework.data.mongodb.core.mapping.Document;

import java.util.Date;

/**
 * 微信公众号AccessToken,使用定时器定时刷新
 */
@Getter
@Setter
@Document("wechat_access_token")
public class WechatAccessTokenPO extends EntityBase {
    /**
     * 应用
     */
    @Indexed(unique = true)
    private String appId;
    /**
     *
     */
    private String accessToken;
    /**
     *
     */
    private String refreshToken;
    /**
     * 失效时间
     */
    @Indexed(expireAfterSeconds = 7200)
    private Date expiredTime;
}
